<html>
<head><meta charset="utf-8"><title>Closure lifetime arguments · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Closure.20lifetime.20arguments.html">Closure lifetime arguments</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="199420439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Closure%20lifetime%20arguments/near/199420439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Diggsey <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Closure.20lifetime.20arguments.html#199420439">(Jun 01 2020 at 20:43)</a>:</h4>
<p>I ran into <a href="https://github.com/rust-lang/rust/issues/59337">https://github.com/rust-lang/rust/issues/59337</a> whilst trying to write some async code on stable, and I've been trying to find what the cause of the problem is / what the path to fixing it would be.<br>
I assumed we expanded closures into a struct and some Fn impls fairly early on, but it seems we keep the "Closure" concept longer than I expected, and I couldn't find where the Fn impls "come from" so to speak. Is this something that would be fixed by polonius? By chalk? Or is it something separate that will require additional work?<br>
It seems to be related to borrow checking primarily, but then also to "generic closures" which I know aren't implemented yet... But then I'm confused how lifetimes in closure parameters work at all when we don't support generic closures?</p>



<a name="199439889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Closure%20lifetime%20arguments/near/199439889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Diggsey <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Closure.20lifetime.20arguments.html#199439889">(Jun 02 2020 at 00:45)</a>:</h4>
<p>ah sty.rs:212 has some helpful explanation</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>